/************************************************************************
 * @file GuiPluginActivator.h
 * @author Ian Chen
 * @version 1.0
 *
 * @section LICENSE
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 3 of
 * the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
 * General Public License for more details at
 * http://www.gnu.org/licenses/lgpl.html
 *
 ************************************************************************/
#ifndef GUIPLUGINACTIVATOR_H
#define GUIPLUGINACTIVATOR_H

#include <QStringList>

#include <pluginui/pluginui_global.h>
#include <pluginui/extension/AbstractExtension.h>
#include <plugin/plugin/PluginActivator.h>
#include <pluginui/plugin/GuiPlugin.h>

using namespace antu::plugin;

namespace antu
{
namespace plugin
{
namespace ui
{
class ConfigPanelManager;

class PLUGINUISHARED_EXPORT GuiPluginActivator : public antu::plugin::PluginActivator
{
public:
    GuiPluginActivator(AbstractExtension* pExtension);
    GuiPluginActivator(PluginContext* pContext, AbstractExtension* pExtension);
    virtual ~GuiPluginActivator();

    virtual void init(QObject* pParent, StatusEventListener* pListener = nullptr);
    virtual void init(const QStringList& plugins, QObject* pParent, StatusEventListener* pListener = nullptr);
    virtual void start(StatusEventListener* pListener = nullptr, bool isRootActivator = false);
    virtual void finishStartup(StatusEventListener* pListener = nullptr);

    inline AbstractExtension* extension()
    {
        return this->m_pExtension;
    }

protected:
    AbstractExtension* m_pExtension;
    ConfigPanelManager* m_pConfigPanelManager;
};
}
}
}

#endif // GUIPLUGINACTIVATOR_H
